package com.zzq.order.controller;

import com.zzq.account.feign.AccountFeign;
import com.zzq.common.result.ResultData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zzq
 * @date 2020/4/15 10:26 上午
 */
@Slf4j
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private AccountFeign accountFeign;

    @GetMapping("/getByCode/{accountCode}")
    public ResultData test(@PathVariable("accountCode") String accountCode) {
        ResultData byCode = accountFeign.getByCode(accountCode);
        return byCode;
    }
}
